//
//  CommonLoginViewController.swift
//  BP_NewClient
//
//  Created by letv on 15/5/31.
//  Copyright (c) 2015年 normal. All rights reserved.
//  用户名 ｜ 邮箱 ｜ 手机号码 ＋ 密码 = 登录

import UIKit

class CommonLoginViewController: BPRootViewController {

    @IBOutlet  var submitBtn : UIBarButtonItem!        // 提交按钮

    override func viewDidLoad() {
        super.viewDidLoad()
        self.navigationItem.rightBarButtonItem = UIBarButtonItem.rightBarButtonItemWithTitle("找回密码", target: self, action: "findPassword", forControlEvents: UIControlEvents.TouchUpInside)
    }
    
    func findPassword(){
        let storyBoard = UIStoryboard(name: "User", bundle: nil)
        let resetPwdVC :UIViewController! = storyBoard.instantiateViewControllerWithIdentifier("ResetPwdViewController")  
        
        self.navigationController?.pushViewController(resetPwdVC, animated: true)
    }
    
    override func didReceiveMemoryWarning() {
        super.didReceiveMemoryWarning()
        // Dispose of any resources that can be recreated.
    }
    /*用户名登录*/
    @IBAction func commonLoginClicked(){
        
        self.dismissViewControllerAnimated(true, completion: {()->() in
            
        })
        
    }
    
    @IBAction  func cancelAction(id :AnyObject){

        self.dismissViewControllerAnimated(false, completion: nil)
    }
    /*
    // MARK: - Navigation
    // In a storyboard-based application, you will often want to do a little preparation before navigation
    override func prepareForSegue(segue: UIStoryboardSegue, sender: AnyObject?) {
        // Get the new view controller using segue.destinationViewController.
        // Pass the selected object to the new view controller.
    }
    */
}
